<?php

/**
 * Created by phpstorem.
 * User: yangakw@qq.com
 * Sign: 猥琐发育，别浪
 * Date: 2018-06-23
 * Time: 上午 9:59
 */
class Userfeedetail extends CI_Model
{
    public function by_id($id)
    {
        return $this->db->from('user_fee_detail')->where("id",$id)->get()->row();
    }
    public function by_user_id($user_id)
    {
        return $this->db->from('user_fee_detail')->where("user_id",$user_id)->get()->result();
    }
    public function add_($user_id,$fee,$memo){
        $this->db->insert('user_fee_detail',[
            "user_id"=>$user_id,
            "fee"=>$fee,
            "memo"=>$memo,
        ]);
    }
}